<pre>
<?php
require_once 'lib.php';
$fp = new FlickrPhotosetsCanvas();
echo $fp->uid;
$fp->facebook->set_user($fp->uid, $fp->config['session_key']);
echo htmlentities($fp->facebook->api_client->profile_getFBML($fp->uid));

$profile_action = '<fb:profile-action url="'.$fp->app_url.'/photos/'.$fp->uid.'/">View <fb:name uid="profileowner" possessive="true" firstnameonly="true" /> Flickr Photos</fb:profile-action>';
$fbml = trim(file_get_contents($fp->app_call_url.'/profile.php?handle='.$fp->uid));

$fp->facebook->api_client->profile_setFBML('', $fp->uid, $fbml, $profile_action);

echo htmlentities($fp->facebook->api_client->profile_getFBML($fp->uid));
?>
</pre>